package com.hondee.fuzzyquery.entity.access;

import com.hondee.fuzzyquery.utils.StringUtil;

public class QueryOrder{
	
	private final String field;
	private final OrderType orderType;
	
	public QueryOrder(String field, OrderType orderType) {
		if(StringUtil.isNullOrEmpty(orderType)||orderType==null){
			throw new RuntimeException("order condition incompelete.");
		}
		this.field = field;
		this.orderType = orderType;
	}
	public String getField() {
		return field;
	}
	public OrderType getOrderType() {
		return orderType;
	}
	
	@Override
	public String toString(){
		return field + " "+ orderType;
	}
	
}
